package linkedlist;

public class SingleLinkedListDemo {
    public static void main(String[] args) {
        HeroNode node1=new HeroNode(1,"松江","及时雨");
        HeroNode node2=new HeroNode(2,"李俊毅","玉麒麟");
        HeroNode node3=new HeroNode(3,"吴用","智多星");

        SingleLinkedList subList=new SingleLinkedList();
//        subList.add(node1);
//        subList.add(node2);
//        subList.add(node3);

        subList.addByOrder(node3);
        subList.addByOrder(node1);
        subList.addByOrder(node2);
        subList.list();

        System.out.println("修改后**************************");
        HeroNode newNode=new HeroNode(2,"卢俊义","玉麒麟");
        subList.update(newNode);
        subList.list();

        System.out.println("删除后**************************");
        subList.delete(1);
        subList.list();
    }
}
